//********************************************************************************************************
// Product Name: MapWindow.dll Alpha
// Description:  The basic module for MapWindow version 6.0
//********************************************************************************************************
// The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); 
// you may not use this file except in compliance with the License. You may obtain a copy of the License at 
// http://www.mozilla.org/MPL/ 
//
// Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF 
// ANY KIND, either expressed or implied. See the License for the specificlanguage governing rights and 
// limitations under the License. 
//
// The Original Code is from MapWindow.dll version 6.0
//
// The Initial Developer of this Original Code is Ted Dunsford. Created 11/24/2008 4:00:44 PM
// 
// Contributor(s): (Open source contributors should list themselves and their modifications here). 
//
//********************************************************************************************************

using System;
using System.Collections.Generic;
using MapWindow.Main;
using MapWindow.Data;
using MapWindow.Drawing;
using MapWindow.Plugins;
using MapWindow.DirectX.PluginInterfaces;
namespace MapWindow.DirectX
{


    /// <summary>
    /// BinaryRasterLayerProvider
    /// </summary>
    public class BinaryRasterLayerProviderDX : IRasterLayerProvider, ILayerProviderDX
    {
        #region Private Variables

        #endregion

        #region Constructors

        /// <summary>
        /// Creates a new instance of BinaryRasterLayerProvider
        /// </summary>
        public BinaryRasterLayerProviderDX()
        {

        }

        #endregion

        #region Methods

        /// <summary>
        /// Not Implemented
        /// </summary>
        /// <param name="filename"></param>
        /// <param name="numRows"></param>
        /// <param name="numColumns"></param>
        /// <param name="dataType"></param>
        /// <param name="inRam"></param>
        /// <param name="container"></param>
        /// <param name="progressHandler"></param>
        /// <returns></returns>
        public IRasterLayer CreateNew(string filename, int numRows, int numColumns, RasterDataTypes dataType, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// Opens an existing bgd file
        /// </summary>
        /// <param name="filename">The string filename</param>
        /// <param name="inRam">boolean this doesn't do anything yet.</param>
        /// <param name="container"></param>
        /// <param name="progressHandler"></param>
        /// <returns></returns>
        public ILayer OpenLayer(string filename, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler)
        {
            return new RasterLayerDX(filename, progressHandler, container);
        }


        #endregion


        #region IRasterLayerProvider Members

        /// <summary>
        /// Description
        /// </summary>
        public string Description
        {
            get { return "Gets or sets binary grids"; }
        }

        /// <summary>
        /// Filter for reading files
        /// </summary>
        public string DialogReadFilter
        {
            get { return "Binary Grids |*.bgd"; }
        }

        /// <summary>
        /// Filter for writing files
        /// </summary>
        public string DialogWriteFilter
        {
            get { return "Binary Grids |*.bgd"; }
        }

        /// <summary>
        /// Clarifies the provider in file dialogs
        /// </summary>
        public string Name
        {
            get { return "MapWindow - Grids"; }
        }

        
        #endregion



        #region ILayerProviderDX Members

        ILayerDX ILayerProviderDX.OpenLayer(string filename, bool inRam, ICollection<ILayer> container, IProgressHandler progressHandler)
        {
            return new RasterLayerDX(filename, progressHandler, container) as ILayerDX;
        }

        #endregion

        #region IRasterLayerProvider Members

        public IRasterLayer Create(string name, string driverCode, int xSize, int ySize, int numBands, Type dataType, string[] options)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
